*** Replication code for "Once Bitten, Twice Shy? Investment Disputes, State Sovereignty and Change in Treaty Design," Alexander Thompson, Tomer Broude, and Yoram Haftel, International Organization ***
** Please contact Yoram Haftel at yoram.haftel@gmail.com for questions about the data, code, and statistical analysis **

** Set directory to wherever .dta file is saved
 
. use "Master Data Set IO Replication March 2019.dta", clear

* Figure 1: Histogram 1 - SRS Substantive * 
 histogram delta_srssubs, by(terminate) scheme(plotplain)
* Figure: Histogram 2 - SRS ISDS * 
.  histogram delta_srsisds, by(terminate) scheme(plotplain) 

** Table 1 - OLS, Sum Respondent & Sum Claimant, from Signing to Exit **

* model 1 - ols, no terminated BITs, SRS Substantive 
reg delta_srssubs respond_s_sum claimant_s_sum NS_IIA period_renegotiate wh_atleast fta neweu_atleast if terminate==0, robust
* model 2 - ols, with terminated BITs, SRS Substantive 
reg delta_srssubs respond_s_sum claimant_s_sum NS_IIA period_renegotiate wh_atleast fta neweu_atleast, robust
* model 3 - ols, no terminated BITs, SRS ISDS
reg delta_srsisds respond_s_sum claimant_s_sum NS_IIA period_renegotiate wh_atleast fta neweu_atleast if terminate==0, robust
* model 4 - ols, with terminated BITs, SRS ISDS 
reg delta_srsisds respond_s_sum claimant_s_sum NS_IIA period_renegotiate wh_atleast fta neweu_atleast , robust

** Table 2 - OLS, Pro Firm Ruling (respondent based), sum from signing to exit **

* model 5 - ols, no terminated BITs, Pro Firm Ruling, SRS Substantive 
reg delta_srssubs profirm_sum_sr NS_IIA period_renegotiate wh_atleast fta neweu_atleast if terminate==0, robust
* model 6 - ols, with terminated BITs, Pro Firm Ruling, SRS Substantive 
reg delta_srssubs profirm_sum_sr NS_IIA period_renegotiate wh_atleast fta neweu_atleast, robust
* model 7 - ols, no terminated BITs, Pro Firm Ruling, SRS ISDS
reg delta_srsisds profirm_sum_sr NS_IIA period_renegotiate wh_atleast fta neweu_atleast if terminate==0, robust
* model 8 - ols, terminated BITs, Pro Firm Ruling, SRS ISDS
reg delta_srsisds profirm_sum_sr NS_IIA period_renegotiate wh_atleast fta neweu_atleast, robust

** Tables 3 - subsets of substantive provisions **

* Models 9-12: SRS Substantive without Preamble Provisions *

 * model 9 - ols, no terminated BITs, respond & claimant 
reg d_subnoprem_01 respond_s_sum claimant_s_sum NS_IIA period_renegotiate wh_atleast fta neweu_atleast  if terminate==0, robust
* model 10 - ols, with terminated BITs
reg d_subnoprem_01 respond_s_sum claimant_s_sum NS_IIA period_renegotiate wh_atleast fta neweu_atleast, robust
* model 11 - ols, no terminated BITs, Pro-investor ruling 
reg d_subnoprem_01 profirm_sum_sr NS_IIA period_renegotiate wh_atleast fta neweu_atleast if terminate==0, robust
* model 12 - ols, with terminated BITs, Pro-investor Ruling 
reg d_subnoprem_01 profirm_sum_sr NS_IIA period_renegotiate wh_atleast fta neweu_atleast, robust

* Models 13-16: definitions of investors and investment * 

* model 13 - ols, no terminated BITs, respond & claimant 
reg d_defin_01 respond_s_sum claimant_s_sum NS_IIA period_renegotiate wh_atleast fta neweu_atleast  if terminate==0, robust
* model 14 - ols, with terminated BITs
reg d_defin_01 respond_s_sum claimant_s_sum NS_IIA period_renegotiate wh_atleast fta neweu_atleast, robust
* model 15 - ols, no terminated BITs, Pro-investor ruling 
reg d_defin_01 profirm_sum_sr NS_IIA period_renegotiate wh_atleast fta neweu_atleast if terminate==0, robust
* model 16 - ols, with terminated BITs, Pro-investor Ruling 
reg d_defin_01 profirm_sum_sr NS_IIA period_renegotiate wh_atleast fta neweu_atleast, robust

* Models 17-20: Standards of treatment (MFN, NT, FET, FPS, PUM) * 

* model 17 - ols, no terminated BITs, respond & claimant 
reg d_standards_01 respond_s_sum claimant_s_sum NS_IIA period_renegotiate wh_atleast fta neweu_atleast  if terminate==0, robust
* model 18 - ols, with terminated BITs
reg d_standards_01 respond_s_sum claimant_s_sum NS_IIA period_renegotiate wh_atleast fta neweu_atleast, robust
* model 19 - ols, no terminated BITs, Pro-investor ruling 
reg d_standards_01 profirm_sum_sr NS_IIA period_renegotiate wh_atleast fta neweu_atleast if terminate==0, robust
* model 20 - ols, with terminated BITs, Pro-investor Ruling 
reg d_standards_01 profirm_sum_sr NS_IIA period_renegotiate wh_atleast fta neweu_atleast, robust

* Models 21-24: Expropriation and compensation provisions * 

* model 21 - ols, no terminated BITs, respond & claimant 
reg d_expcomp_01 respond_s_sum claimant_s_sum NS_IIA period_renegotiate wh_atleast fta neweu_atleast  if terminate==0, robust
* model 22 - ols, with terminated BITs
reg d_expcomp_01 respond_s_sum claimant_s_sum NS_IIA period_renegotiate wh_atleast fta neweu_atleast, robust
* model 23 - ols, no terminated BITs, Pro-investor ruling 
reg d_expcomp_01 profirm_sum_sr NS_IIA period_renegotiate wh_atleast fta neweu_atleast if terminate==0, robust
* model 24 - ols, with terminated BITs, Pro-investor Ruling 
reg d_expcomp_01 profirm_sum_sr NS_IIA period_renegotiate wh_atleast fta neweu_atleast, robust

* Models 25-28: Flexibility provisions * 

* model 25 - ols, no terminated BITs, respond & claimant 
reg d_flex_01 respond_s_sum claimant_s_sum NS_IIA period_renegotiate wh_atleast fta neweu_atleast  if terminate==0, robust
* model 26 - ols, with terminated BITs
reg d_flex_01 respond_s_sum claimant_s_sum NS_IIA period_renegotiate wh_atleast fta neweu_atleast, robust
* model 27 - ols, no terminated BITs, Pro-investor ruling 
reg d_flex_01 profirm_sum_sr NS_IIA period_renegotiate wh_atleast fta neweu_atleast if terminate==0, robust
* model 28 - ols, with terminated BITs, Pro-investor Ruling 
reg d_flex_01 profirm_sum_sr NS_IIA period_renegotiate wh_atleast fta neweu_atleast, robust


*** End of do-file
